package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ SystemnotificationsModel = (*customSystemnotificationsModel)(nil)

type (
	// SystemnotificationsModel is an interface to be customized, add more methods here,
	// and implement the added methods in customSystemnotificationsModel.
	SystemnotificationsModel interface {
		systemnotificationsModel
		withSession(session sqlx.Session) SystemnotificationsModel
	}

	customSystemnotificationsModel struct {
		*defaultSystemnotificationsModel
	}
)

// NewSystemnotificationsModel returns a model for the database table.
func NewSystemnotificationsModel(conn sqlx.SqlConn) SystemnotificationsModel {
	return &customSystemnotificationsModel{
		defaultSystemnotificationsModel: newSystemnotificationsModel(conn),
	}
}

func (m *customSystemnotificationsModel) withSession(session sqlx.Session) SystemnotificationsModel {
	return NewSystemnotificationsModel(sqlx.NewSqlConnFromSession(session))
}
